//
//  PaymentManager.h
//  ZCJZ
//
//  Created by sujeking on 2019/3/1.
//  Copyright © 2019年 jeking. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WXApi.h"
#import <WXApi.h>
#import <AlipaySDK/AlipaySDK.h>

@protocol WXApiManagerDelegate <NSObject>

@optional
- (void)managerDidRecvPaymentResponse:(PayResp *)response;
- (void)managerDidRecvMiniResponse:(WXLaunchMiniProgramResp *)response;
- (void)managerDidRecvShareResponse:(SendMessageToWXResp *)response;
- (void)managerDidRecvAuthResponse:(SendAuthResp *)response;
@end

@interface PaymentManager : NSObject <WXApiDelegate>

@property (nonatomic, weak) id<WXApiManagerDelegate> delegate;

- (void)setAliPayCallback:(NSDictionary *)info;

+ (instancetype)sharedManager;

- (void)weiXinPayWithDic:(NSDictionary *)wechatPayDic;

- (void)loadWeiXinMiniProgram:(NSString *)orderId;

/// 小程序充值页面
- (void)loadWeiXinMiniProgram2Recharge;
/// 分享给微信好友
- (void)share2WeiXinFirendList:(id)obj;
/// 分享到朋友圈
- (void)share2WeiXinCycle:(id)obj;
/// 微信授权登录
- (void)auth2WeiXinWithVC:(UIViewController *)vc callback:(void(^)(NSString *msg))callback;
/// 登录
- (void)login2WeiXinWithCallback:(void(^)(NSString *msg))callback;

/// 微信支付
- (void)loadWXPayWithWithOrderSignInfo:(NSDictionary *)info;
/// 支付宝支付
- (void)loginAliPayWithOrderSignStr:(NSString *)str callback:(void(^)(NSDictionary *dict))callback;

@end

